﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using ReallyReallyReallySimpleRoguelike.Screens;

namespace ReallyReallyReallySimpleRoguelike.Managers
{
    /// <summary>
    /// Manages the game flow.
    /// </summary>
    class GameManager
    {

        #region variables

        //This should be a list in a screen manager.
        private StoryScreen storyScreen;
        public DungeonScreen dungeonScreen;
        public CreditScreen creditScreen;

        #endregion

        #region singleton
        static readonly GameManager instance = new GameManager();

        public static GameManager Instance
        {
            get { return instance; }
        }
        #endregion

        #region methods
        /// <summary>
        /// Initializes the gameScreens.
        /// </summary>
        public void Initialize() 
        {
            storyScreen = new StoryScreen();
            dungeonScreen = new DungeonScreen();
            creditScreen = new CreditScreen();
        }

        /// <summary>
        /// Entry point. Designs the gameflow.
        /// </summary>
        public void Run()
        {
            GameManager.Instance.Initialize();
             
            //This should really be moved to a screen manager.
            //When one screen has finshed the other starts controlling flow.
            
            storyScreen.Show();
            //move to next screen
            dungeonScreen.Show();
            //move to next screen
            creditScreen.Show();
            //exit
        }

        #endregion

    }
}
